package demo1;

public class Test {
    public static void main(String[] args) {
        //StringBuffer类型转变成String类型
        StringBuffer stringBuffer = new StringBuffer("hello");
        System.out.println(stringBuffer.toString().);




    }



    public static void main2(String[] args){
        StringBuffer stringBuffer =  new StringBuffer("hello world");
        System.out.println(stringBuffer.insert(2, "比特"));
        System.out.println(stringBuffer);   //从结果中可以看到stringBuffer被修改
    }
    public static void main1(String[] args) {
         String  string1 = "hello world";
        // string1.split()
         final  String string2 = "hehe";
    //     string2 = string1;
    }
}
